import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/home/index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    // 首页路由
    name: 'home',
	components:{
		main:HomeView,
	}
  },
  {
    // 登录注册路由
    path: '/user',
    name: 'user',
    component: () => import(/* webpackChunkName: "user" */ '../views/user/index.vue')
  },
  {
    // 分类路由
    path: '/kind/:id',
    name: 'kind',
    components:{
		main:() => import(/* webpackChunkName: "kind" */ '../views/kind/index.vue')
	} 
  },
  {
    //收藏路由
    path: '/coll/:id',
    name: 'coll',
    components:{
		main:() => import(/* webpackChunkName: "kind" */ '../views/coll/index.vue')
	} 
  },
  {
    // 个人中心路由
    path: '/person/:id',
    name: 'person',
    components:{
		main:() => import(/* webpackChunkName: "eprson" */ '../views/person/index.vue')
	} 
  }
]

const router = new VueRouter({
  routes
})

export default router
